package com.smedi.ismedi.inmail.core.port.adapter.persistence.mybatis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smedi.ismedi.inmail.core.port.adapter.persistence.model.DingDeptUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @className: DingDeptUserMapper
 * @Description: TODO
 * @version: v1.0.0
 * @author: wzx
 * @date: 2022/9/20 10:25
 */

@Mapper
public interface DingDeptUserMapper extends BaseMapper<DingDeptUserEntity> {

    List<String> getUserIdsByDeptKey(@Param("dingDeptKey") String dingDeptKey);

    void batchSave(@Param("userIds") List<String> userIds,@Param("deptKey") String deptKey);

    void batchDelete(@Param("userIds") List<String> userIds,@Param("deptKey") String deptKey);

    void batchSaveIsmediUserId(@Param("deptUsers") List<DingDeptUserEntity> dingDeptUserEntities);

    List<DingDeptUserEntity> getListByDeptKey(@Param("deptKey") String deptKey);

    List<DingDeptUserEntity> getAllUserIdAndDeptKey();

    List<String> getUserIds();

    Long getPersonNum(@Param("personId") Long personId);

    List<String> peopleByProjectId(@Param("projectId") String projectId);

}